#ifndef __OC_Camera_H__
#define __OC_Camera_H__

#pragma warning (disable: 4819)

#include "OpenGLDef.h"
#include "OCMain/Common.h"

namespace OCPP
{
	class _openGLExport Camera
	{
	public:
		Camera();
		~Camera();
		Vector3 getPosition() {
			return mvPosition;
		}
		void setPosition(Vector3 position) { mvPosition = position; }
		void setLookAt(Vector3 target) 
		{
			mvOrientation = target;
		}
		const Matrix4& getViewMatrix();
		const Matrix4& getProjectMatrix();
		const Matrix4& getOthographicProjectMatrix();
		const Matrix4& getViewProjectMatrix();

		int height = 800;
		int width = 800;
		bool firstClick = true;
		// Adjust the speed of the camera and it's sensitivity when looking around
		float speed = 0.1f;
		float sensitivity = 100.0f;
		void Inputs(GLFWwindow* window);
		glm::vec3 Orientation = glm::vec3(0.0f, 0.0f, -1.0f);
	private:
		float mFarDist = 100.0f;
		float mNearDist = 0.1f;
		Vector3 mvPosition = Vector3::ZERO;
		Vector3 mvOrientation = Vector3(0.0f, 0.0f, -1.0f);
		Vector3 mvUp = Vector3::UNIT_Y;
		Matrix4 mViewMatrix = Matrix4::IDENTITY;
		Matrix4 mProjMatrix = Matrix4::IDENTITY;
		Matrix4 mViewProjectMatrix = Matrix4::IDENTITY;
	};
}

#endif // !__OC_WINDOW_H__
